package com.meiyou.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.meiyou.service.JiguangTuiSongService;
import com.meiyou.utils.Msg;

import io.swagger.annotations.ApiOperation;

@Controller
public class JiGuangTuiSongController {
	@Autowired 
	JiguangTuiSongService jigaungService;
	
	@RequestMapping(value = "sendMessage", method = RequestMethod.POST)
	@ApiOperation(value = "推送消息")
	public @ResponseBody Msg sendMessage(String context) {
	   Msg msg;
		if(jigaungService.sndMsg(context)) {
			msg = Msg.success();
		}else {
			msg = Msg.fail();
		}
		return msg;
		
	}
	
	
}
